package com.adisi.bd;

import java.sql.Connection;
import java.sql.DriverManager;
//import java.sql.ResultSet;
import java.sql.SQLException;
//import java.sql.Statement;


public class Coneccion {
	
	/**
	 * Se encarga de la conexion a Base de datos
	 * 
	 * @return Connection
	 */
	public Connection conectar(){
		Connection con = null;
		
		String userName ="user_server";
		String password ="tiburones3";

		String url = "jdbc:sqlserver://localhost\\SQLEXPRESS;databaseName=Remises";
		
		try{
			
			Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
			
			con = DriverManager.getConnection(url,userName,password);
			
		}catch(SQLException e){
			e.printStackTrace();
		}
        catch (ClassNotFoundException e){
            e.printStackTrace();
		}
		
		return con;
	}
	
}
